<?php
//  +----------------------------------------------------------------------
//  | Copyright (c) 2015-2025 http://www.hdphp.cn All rights reserved.
//  | Licensed ( http://www.hdphp.cn/licenses/ )
//  | Author: Jack <sophia2152@qq.com>
//  | 官方网址: http://www.hdphp.cn
//  | 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用。
//  | 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
//  +----------------------------------------------------------------------

use app\http\middleware\AllowOriginMiddleware;
use app\http\middleware\out\AuthTokenMiddleware;
use app\http\middleware\StationOpenMiddleware;
use think\facade\Route;

/**
 * 对外接口路由配置
 */
Route::group('outapi', function () {

    Route::group(function () {
        // 获取token
        Route::post('get_token', 'OutAccount/getToken')->name('getToken');
    });

    // 授权接口
    Route::group(function () {
        // 短连接
        Route::post('short/set_short', 'Short/set_short')->name('setShort');

    })->middleware(AuthTokenMiddleware::class, true);

})->prefix('out.')->middleware(AllowOriginMiddleware::class)->middleware(StationOpenMiddleware::class);

